<?php
/**
 * 申请订单控制器
 * @author 聂哥
 * @Date: 2023-03-06 10:46:45
*/
namespace app\admin\controller\supply;

use app\common\controller\SupplyController;
use app\admin\model\SupplyOrder;


class Orders extends SupplyController
{
    protected $model = 'SupplyOrder';

    public function index()
    {
        if ($this->request->isAjax()) {
            $select = SupplyOrder::where('type',2)->select();
            $data = [
                'code'  => 0,
                'msg'   => '',
                'count' => $select->count(),
                'data'  => $select,
            ];
            return json($data);
        }
        return $this->fetch();
    }
}
